<?php
$this->breadcrumbs = array(
	'员工列表' => array(
		'employee/index'
	),
	$model->employee->getFullName() => array(
		'employee/view',
		'id' => $model->employeeId,
	),
	'查看证书'
);

$this->userActions = array(
	array(
		'label' => '证书列表',
		'url' => array(
			'index'
		)
	),
	array(
		'label' => '添加证书',
		'url' => array(
			'create',
			'employeeId' => $model->employeeId,
		)
	),
	array(
		'label' => '更新证书',
		'url' => array(
			'update',
			'id' => $model->id
		)
	),
	array(
		'label' => '删除证书',
		'url' => '#',
		'linkOptions' => array(
			'submit' => array(
				'delete',
				'id' => $model->id
			),
			'confirm' => '确定要删除这个证书和上传图片么？'
		)
	),
	array(
		'label' => '管理证书',
		'url' => array(
			'admin',
			'employeeId' => $model->employeeId,
		)
	),
);
?>

<h1>查看证书</h1>
<?php $this
	->widget('zii.widgets.CDetailView',
		array(
			'data' => $model,
			'attributes' => array(
				//'id',
				//'employeeId',
				'grantDate',
				'educateDate',
				'extendDate',
				'expireDate',
				'summary',
				'note',
				array(
					'name' => 'typeId',
					'type' => 'raw',
					'value' => $model->getDisplayType(),
				),
				array(
					'name' => 'imagePath',
					'type' => 'raw',
					'value' => CHtml::link(
						CHtml::image(
							Yii::app()->baseUrl . "/uploads/employeeCertificate/tn/"
								. $model->thumbPath),
						Yii::app()->baseUrl . "/uploads/employeeCertificate/" . $model->imagePath,
						array(
							"target" => "_blank"
						)),
				),
				'createTime',
				'createUserId',
				'updateTime',
				'updateUserId',
			),
		));
?>
